from django import forms as djforms
import google.appengine.ext.db.djangoforms as forms
from google.appengine.ext.db.djangoforms import ModelChoiceField
from django.forms.fields import MultipleChoiceField
from django.forms.widgets import CheckboxSelectMultiple
import models
    
    
class HillForm(forms.ModelForm):
    class Meta:
        model = models.Hill

class RunForm(forms.ModelForm):
    #hill = ModelChoiceField(models.Hill.objects, None)
    #typeRunning = ModelChoiceField(                             
        #["rocky", "powder", "artificial snow", "hard", "soup"]
    #)
    
    class Meta:
        model = models.Run

class HillRunForm(forms.ModelForm):
    class Meta:
        model = models.Run
        exclude = ('hill',)
        
class LiftForm(forms.ModelForm):
    class Meta:
        model = models.Lift
        
class UserForm(forms.ModelForm):
    class Meta:
        model = models.UserRight
        
class FeedbackForm(forms.ModelForm):
    #checks.widget = djforms.Select()
    checks = MultipleChoiceField(choices=[("rocky","rocky"), ("powder","powder"), ("artificial snow","artificial snow"), ("hard","hard"), ("soup","soup")],
                                          widget=CheckboxSelectMultiple)
    class Meta:
        model = models.Feedback
        exclude = ('run',)
 